﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml;

namespace DateBaseSyshronous
{
    public class XmlHelper
    {
        public static XmlDocument GetXmlDoument(string path) {
            try {
                XmlDocument doc = new XmlDocument();
                XmlReaderSettings settings = new XmlReaderSettings();
                settings.IgnoreComments = true;//忽略文档里面的注释
                XmlReader reader = XmlReader.Create(path, settings);
                doc.Load(reader);
                return doc;
            }
            catch (Exception ex) {
                throw ex;
            }
        }
    }
}
